package com.six.backend.service.impl;

import com.six.backend.dao.InformDao;
import com.six.backend.pojo.Inform;
import com.six.backend.service.InformService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: skyler
 * @Date: 2021/12/19 21:19
 */
@Service
public class InformServiceImpl implements InformService {
    @Autowired
    private InformDao informDao;


    @Override
    public List<Inform> selectReadingInform(String account) {
        return informDao.selectReadingInform(account);
    }

    @Override
    public List<Inform> selectUnReadInform(String account) {
        return informDao.selectUnreadInform(account);
    }


    @Override
    public boolean deleteInform(Integer id) {
        return informDao.deleteInform(id) > 0;
    }

    @Override
    public boolean changeInformStatus(Integer id) {
        return informDao.changeInformStatus(id) > 0;
    }
}
